package com.shop.service;

import com.shop.bean.Product;
import com.shop.bean.Product_images;
import com.shop.util.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface IProductService {
    int addProduct(Product product);

    void addProductWithImages(Product product);
    void editProductWithImages(Product product);

    int deleteProduct(int id);
    int editProduct(Product product);
    List<Product> selectProducts(Page page, String text);
    List<Product> getProductByCategoryAndName(Product product,Page page, String text);
    Product getProductById(int id);
    List<Product> getChildren(int id);
    int getCount(String text);
    int getCounts(String text,Product product);
    //上下架商品
    int putOn(int id);
    int putOff(int id);

    //取最新的六个商品
    List<Product> getNew8() ;

    int decStock(Integer productid,Integer quantity);




}